

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>Ceph 仪表盘 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/underscore.js"></script>
        <script src="../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="Ceph RESTful API" href="../ceph_api/" />
    <link rel="prev" title="ceph-mgr orchestrator 模块" href="../orchestrator_modules/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../">Ceph 管理器守护进程</a> &raquo;</li>
        
      <li>Ceph 仪表盘</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/mgr/dashboard.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../">
          

          
            
            <img src="../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../">Ceph 管理器守护进程</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../administrator/">安装和配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../modules/">模块编程</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orchestrator_modules/">编写 orchestrator 插件</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">仪表盘模块</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id1">概述</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id2">功能概述</a></li>
<li class="toctree-l4"><a class="reference internal" href="#overview-of-the-dashboard-landing-page">Overview of the Dashboard Landing Page</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id3">支持的浏览器</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#id4">如何启用</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id5">配置</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#ssl-tls">SSL/TLS 支持</a></li>
<li class="toctree-l4"><a class="reference internal" href="#dashboard-host-name-and-port">主机名和端口</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id7">用户名和密码</a></li>
<li class="toctree-l4"><a class="reference internal" href="#account-lock-out">Account Lock-out</a></li>
<li class="toctree-l4"><a class="reference internal" href="#enable-a-locked-user">Enable a Locked User</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id8">访问仪表盘</a></li>
<li class="toctree-l4"><a class="reference internal" href="#dashboard-enabling-object-gateway">启用对象网关管理前端</a></li>
<li class="toctree-l4"><a class="reference internal" href="#iscsi">启用 iSCSI 的管理</a></li>
<li class="toctree-l4"><a class="reference internal" href="#grafana">允许嵌入 Grafana 仪表盘</a></li>
<li class="toctree-l4"><a class="reference internal" href="#single-sign-on-sso">启用单点登录（ Single Sign-On, SSO ）</a></li>
<li class="toctree-l4"><a class="reference internal" href="#dashboard-alerting">启用 Prometheus 报警</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#dashboard-user-role-management">用户和角色管理</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id13">密码策略</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id14">用户帐户</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id15">用户角色和权限</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id16">用户和定制角色创建实例</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#dashboard-proxy-configuration">代理配置</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#url">配置一个 URL 前缀</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id18">禁用重定向</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id19">配置错误状态码</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id20">HAProxy 配置实例</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#api">审计 API 请求</a></li>
<li class="toctree-l3"><a class="reference internal" href="#nfs-ganesha">NFS-Ganesha 的管理</a></li>
<li class="toctree-l3"><a class="reference internal" href="#plug-ins">Plug-ins</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#dashboard-feature-toggles">功能开关</a></li>
<li class="toctree-l4"><a class="reference internal" href="#dashboard-debug">调试</a></li>
<li class="toctree-l4"><a class="reference internal" href="#message-of-the-day-motd">Message of the day (MOTD)</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#id25">仪表盘排障</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id26">定位仪表盘</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id27">访问仪表盘</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id28">从仪表盘看不到日志</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id29">仪表盘的某个功能失效</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id30">Ceph 仪表盘的日志</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../ceph_api/">Ceph RESTful API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../alerts/">Alerts 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../diskprediction/">DiskPrediction 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../localpool/">localpool 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../restful/">RESTful 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../zabbix/">Zabbix 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prometheus/">Prometheus 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../influx/">Influx 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../hello/">Hello 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../telegraf/">Telegraf 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../telemetry/">Telemetry 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../iostat/">Iostat 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../crash/">Crash 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../insights/">Insights 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orchestrator/">Orchestrator 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rook/">Rook 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rgw/">RGW 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mds_autoscaler/">MDS Autoscaler 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../nfs/">NFS 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../progress/">Progress 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../cli_api/">CLI API 命令模块</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Ceph 仪表盘</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#id1">概述</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id2">功能概述</a></li>
<li class="toctree-l3"><a class="reference internal" href="#overview-of-the-dashboard-landing-page">Overview of the Dashboard Landing Page</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#status">Status</a></li>
<li class="toctree-l4"><a class="reference internal" href="#capacity">Capacity</a></li>
<li class="toctree-l4"><a class="reference internal" href="#performance">Performance</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#id3">支持的浏览器</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id4">如何启用</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id5">配置</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#ssl-tls">SSL/TLS 支持</a></li>
<li class="toctree-l3"><a class="reference internal" href="#dashboard-host-name-and-port">主机名和端口</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id7">用户名和密码</a></li>
<li class="toctree-l3"><a class="reference internal" href="#account-lock-out">Account Lock-out</a></li>
<li class="toctree-l3"><a class="reference internal" href="#enable-a-locked-user">Enable a Locked User</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id8">访问仪表盘</a></li>
<li class="toctree-l3"><a class="reference internal" href="#dashboard-enabling-object-gateway">启用对象网关管理前端</a></li>
<li class="toctree-l3"><a class="reference internal" href="#iscsi">启用 iSCSI 的管理</a></li>
<li class="toctree-l3"><a class="reference internal" href="#grafana">允许嵌入 Grafana 仪表盘</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#installation-and-configuration-using-cephadm">Installation and Configuration using cephadm</a></li>
<li class="toctree-l4"><a class="reference internal" href="#manual-installation-and-configuration">Manual Installation and Configuration</a></li>
<li class="toctree-l4"><a class="reference internal" href="#enabling-rbd-image-monitoring">Enabling RBD-Image monitoring</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id10">仪表盘的配置</a></li>
<li class="toctree-l4"><a class="reference internal" href="#alternative-url-for-browsers">Alternative URL for Browsers</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#single-sign-on-sso">启用单点登录（ Single Sign-On, SSO ）</a></li>
<li class="toctree-l3"><a class="reference internal" href="#dashboard-alerting">启用 Prometheus 报警</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#dashboard-user-role-management">用户和角色管理</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id13">密码策略</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id14">用户帐户</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id15">用户角色和权限</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id16">用户和定制角色创建实例</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#dashboard-proxy-configuration">代理配置</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#url">配置一个 URL 前缀</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id18">禁用重定向</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id19">配置错误状态码</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id20">HAProxy 配置实例</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#api">审计 API 请求</a></li>
<li class="toctree-l2"><a class="reference internal" href="#nfs-ganesha">NFS-Ganesha 的管理</a></li>
<li class="toctree-l2"><a class="reference internal" href="#plug-ins">Plug-ins</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#dashboard-feature-toggles">功能开关</a></li>
<li class="toctree-l3"><a class="reference internal" href="#dashboard-debug">调试</a></li>
<li class="toctree-l3"><a class="reference internal" href="#message-of-the-day-motd">Message of the day (MOTD)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id25">仪表盘排障</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id26">定位仪表盘</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id27">访问仪表盘</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id28">从仪表盘看不到日志</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id29">仪表盘的某个功能失效</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id30">Ceph 仪表盘的日志</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id31">仪表盘调试标志</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id32">配置仪表盘模块的日志级别</a></li>
<li class="toctree-l4"><a class="reference internal" href="#reporting-issues-from-dashboard">Reporting issues from Dashboard</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="ceph">
<span id="mgr-dashboard"></span><h1>Ceph 仪表盘<a class="headerlink" href="#ceph" title="Permalink to this headline">¶</a></h1>
<div class="section" id="id1">
<h2>概述<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<p>The Ceph Dashboard is a built-in web-based Ceph management and monitoring
application to administer various aspects and objects of the cluster. It is
implemented as a <a class="reference internal" href="../#ceph-manager-daemon"><span class="std std-ref">Ceph 管理器守护进程</span></a> module.</p>
<p>The original Ceph Manager Dashboard that was shipped with Ceph Luminous started
out as a simple read-only view into various run-time information and performance
data of a Ceph cluster. It used a very simple architecture to achieve the
original goal. However, there was a growing demand for adding more web-based
management capabilities, to make it easier to administer Ceph for users that
prefer a WebUI over using the command line.</p>
<p>The new <a class="reference internal" href="../../glossary/#term-Ceph-Dashboard"><span class="xref std std-term">Ceph Dashboard</span></a> module is a replacement of the previous one and
adds a built-in web based monitoring and administration application to the Ceph
Manager. The architecture and functionality of this new module is derived from
and inspired by the <a class="reference external" href="https://openattic.org/">openATTIC Ceph management and monitoring tool</a>. The development is actively driven by the team
behind openATTIC at <a class="reference external" href="https://www.suse.com/">SUSE</a>, with a lot of support from
companies like <a class="reference external" href="https://redhat.com/">Red Hat</a> and other members of the Ceph
community.</p>
<p>The dashboard module’s backend code uses the CherryPy framework and a custom
REST API implementation. The WebUI implementation is based on
Angular/TypeScript, merging both functionality from the original dashboard as
well as adding new functionality originally developed for the standalone version
of openATTIC. The Ceph Dashboard module is implemented as a web
application that visualizes information and statistics about the Ceph cluster
using a web server hosted by <code class="docutils literal notranslate"><span class="pre">ceph-mgr</span></code>.</p>
<div class="section" id="id2">
<h3>功能概述<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<p>The dashboard provides the following features:</p>
<ul class="simple">
<li><p><strong>Multi-User and Role Management</strong>: The dashboard supports multiple user
accounts with different permissions (roles). The user accounts and roles
can be modified on both the command line and via the WebUI. The dashboard
supports various methods to enhance password security, e.g. by enforcing
configurable password complexity rules, forcing users to change their password
after the first login or after a configurable time period. See
<a class="reference internal" href="#dashboard-user-role-management"><span class="std std-ref">用户和角色管理</span></a> for details.</p></li>
<li><p><strong>Single Sign-On (SSO)</strong>: the dashboard supports authentication
via an external identity provider using the SAML 2.0 protocol. See
<a class="reference internal" href="#dashboard-sso-support"><span class="std std-ref">启用单点登录（ Single Sign-On, SSO ）</span></a> for details.</p></li>
<li><p><strong>SSL/TLS support</strong>: All HTTP communication between the web browser and the
dashboard is secured via SSL. A self-signed certificate can be created with
a built-in command, but it’s also possible to import custom certificates
signed and issued by a CA. See <a class="reference internal" href="#dashboard-ssl-tls-support"><span class="std std-ref">SSL/TLS 支持</span></a> for details.</p></li>
<li><p><strong>Auditing</strong>: the dashboard backend can be configured to log all PUT, POST
and DELETE API requests in the Ceph audit log. See <a class="reference internal" href="#dashboard-auditing"><span class="std std-ref">审计 API 请求</span></a>
for instructions on how to enable this feature.</p></li>
<li><p><strong>Internationalization (I18N)</strong>: the dashboard can be used in different
languages that can be selected at run-time.</p></li>
</ul>
<p>Currently, Ceph Dashboard is capable of monitoring and managing the following
aspects of your Ceph cluster:</p>
<ul class="simple">
<li><p><strong>Overall cluster health</strong>: Display performance and capacity metrics as well
as cluster status.</p></li>
<li><p><strong>Embedded Grafana Dashboards</strong>: Ceph Dashboard
<a class="reference external" href="https://grafana.com/">Grafana</a> dashboards may be embedded in external applications and web pages
to surface information and performance metrics gathered by
the <a class="reference internal" href="../prometheus/#mgr-prometheus"><span class="std std-ref">Prometheus 模块</span></a> module. See
<a class="reference internal" href="#dashboard-grafana"><span class="std std-ref">允许嵌入 Grafana 仪表盘</span></a> for details on how to configure this functionality.</p></li>
<li><p><strong>Cluster logs</strong>: Display the latest updates to the cluster’s event and
audit log files. Log entries can be filtered by priority, date or keyword.</p></li>
<li><p><strong>Hosts</strong>: Display a list of all cluster hosts along with their
storage drives, which services are running, and which version of Ceph is
installed.</p></li>
<li><p><strong>Performance counters</strong>: Display detailed service-specific statistics for
each running service.</p></li>
<li><p><strong>Monitors</strong>: List all Mons, their quorum status, and open sessions.</p></li>
<li><p><strong>Monitoring</strong>: Enable creation, re-creation, editing, and expiration of
Prometheus’ silences, list the alerting configuration and all
configured and firing alerts. Show notifications for firing alerts.</p></li>
<li><p><strong>Configuration Editor</strong>: Display all available configuration options,
their descriptions, types, default and currently set values.  These may be edited as well.</p></li>
<li><p><strong>Pools</strong>: List Ceph pools and their details (e.g. applications,
pg-autoscaling, placement groups, replication size, EC profile, CRUSH
rules, quotas etc.)</p></li>
<li><p><strong>OSDs</strong>: List OSDs, their status and usage statistics as well as
detailed information like attributes (OSD map), metadata, performance
counters and usage histograms for read/write operations. Mark OSDs
up/down/out, purge and reweight OSDs, perform scrub operations, modify
various scrub-related configuration options, select profiles to
adjust the level of backfilling activity. List all drives associated with an
OSD. Set and change the device class of an OSD, display and sort OSDs by
device class. Deploy OSDs on new drives and hosts.</p></li>
<li><p><strong>Device management</strong>: List all hosts known by the orchestrator. List all
drives attached to a host and their properties. Display drive
health predictions and SMART data. Blink enclosure LEDs.</p></li>
<li><p><strong>iSCSI</strong>: List all hosts that run the TCMU runner service, display all
images and their performance characteristics (read/write ops, traffic).
Create, modify, and delete iSCSI targets (via <code class="docutils literal notranslate"><span class="pre">ceph-iscsi</span></code>). Display the
iSCSI gateway status and info about active initiators.
See <a class="reference internal" href="#dashboard-iscsi-management"><span class="std std-ref">启用 iSCSI 的管理</span></a> for instructions on how to configure
this feature.</p></li>
<li><p><strong>RBD</strong>: List all RBD images and their properties (size, objects, features).
Create, copy, modify and delete RBD images (incl. snapshots) and manage RBD
namespaces. Define various I/O or bandwidth limitation settings on a global,
per-pool or per-image level. Create, delete and rollback snapshots of selected
images, protect/unprotect these snapshots against modification. Copy or clone
snapshots, flatten cloned images.</p></li>
<li><p><strong>RBD mirroring</strong>: Enable and configure RBD mirroring to a remote Ceph server.
List active daemons and their status, pools and RBD images including
sync progress.</p></li>
<li><p><strong>CephFS</strong>: List active file system clients and associated pools,
including usage statistics. Evict active CephFS clients. Manage CephFS
quotas and snapshots. Browse a CephFS directory structure.</p></li>
<li><p><strong>Object Gateway</strong>: List all active object gateways and their performance
counters. Display and manage (add/edit/delete) object gateway users and their
details (e.g. quotas) as well as the users’ buckets and their details (e.g.
placement targets, owner, quotas, versioning, multi-factor authentication).
See <a class="reference internal" href="#dashboard-enabling-object-gateway"><span class="std std-ref">启用对象网关管理前端</span></a> for configuration instructions.</p></li>
<li><p><strong>NFS</strong>: Manage NFS exports of CephFS file systems and RGW S3 buckets via NFS
Ganesha. See <a class="reference internal" href="#dashboard-nfs-ganesha-management"><span class="std std-ref">NFS-Ganesha 的管理</span></a> for details on how to
enable this functionality.</p></li>
<li><p><strong>Ceph Manager Modules</strong>: Enable and disable Ceph Manager modules, manage
module-specific configuration settings.</p></li>
</ul>
</div>
<div class="section" id="overview-of-the-dashboard-landing-page">
<h3>Overview of the Dashboard Landing Page<a class="headerlink" href="#overview-of-the-dashboard-landing-page" title="Permalink to this headline">¶</a></h3>
<p>Displays overall cluster status, performance, and capacity metrics. Shows instant
feedback for changes in the cluster and provides easy access to subpages of the
dashboard.</p>
<div class="section" id="status">
<span id="dashboard-landing-page-status"></span><h4>Status<a class="headerlink" href="#status" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>Cluster Status</strong>: Displays overall cluster health. In case of any error it
displays a short description of the error and provides a link to the logs.</p></li>
<li><p><strong>Hosts</strong>: Displays the total number of hosts associated to the cluster and
links to a subpage that lists and describes each.</p></li>
<li><p><strong>Monitors</strong>: Displays mons and their quorum status and
open sessions.  Links to a subpage that lists and describes each.</p></li>
<li><p><strong>OSDs</strong>: Displays object storage daemons (ceph-osds) and
the numbers of OSDs running (up), in service
(in), and out of the cluster (out). Provides links to
subpages providing a list of all OSDs and related management actions.</p></li>
<li><p><strong>Managers</strong>: Displays active and standby Ceph Manager
daemons (ceph-mgr).</p></li>
<li><p><strong>Object Gateway</strong>: Displays active object gateways (RGWs) and
provides links to subpages that list all object gateway daemons.</p></li>
<li><p><strong>Metadata Servers</strong>: Displays active and standby CephFS metadata
service daemons (ceph-mds).</p></li>
<li><p><strong>iSCSI Gateways</strong>: Display iSCSI gateways available,
active (up), and inactive (down). Provides a link to a subpage
showing a list of all iSCSI Gateways.</p></li>
</ul>
</div>
<div class="section" id="capacity">
<span id="dashboard-landing-page-capacity"></span><h4>Capacity<a class="headerlink" href="#capacity" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>Raw Capacity</strong>: Displays the capacity used out of the total
physical capacity provided by storage nodes (OSDs).</p></li>
<li><p><strong>Objects</strong>: Displays the number and status of RADOS objects
including the percentages of healthy, misplaced, degraded, and unfound
objects.</p></li>
<li><p><strong>PG Status</strong>: Displays the total number of placement groups and
their status, including the percentage clean, working,
warning, and unknown.</p></li>
<li><p><strong>Pools</strong>: Displays pools and links to a subpage listing details.</p></li>
<li><p><strong>PGs per OSD</strong>: Displays the number of placement groups assigned to
object storage daemons.</p></li>
</ul>
</div>
<div class="section" id="performance">
<span id="dashboard-landing-page-performance"></span><h4>Performance<a class="headerlink" href="#performance" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>Client READ/Write</strong>: Displays an overview of
client input and output operations.</p></li>
<li><p><strong>Client Throughput</strong>: Displays the data transfer rates to and from Ceph clients.</p></li>
<li><p><strong>Recovery throughput</strong>: Displays rate of cluster healing and balancing operations.</p></li>
<li><p><strong>Scrubbing</strong>: Displays light and deep scrub status.</p></li>
</ul>
</div>
</div>
<div class="section" id="id3">
<h3>支持的浏览器<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<p>Ceph Dashboard is primarily tested and developed using the following web
browsers:</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 62%" />
<col style="width: 38%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Browser</p></th>
<th class="head"><p>Versions</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="https://www.google.com/chrome/">Chrome</a> and
<a class="reference external" href="https://www.chromium.org/">Chromium</a> based browsers</p></td>
<td><p>latest 2 major versions</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.mozilla.org/firefox/">Firefox</a></p></td>
<td><p>latest 2 major versions</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://www.mozilla.org/firefox/enterprise/">Firefox ESR</a></p></td>
<td><p>latest major version</p></td>
</tr>
</tbody>
</table>
<p>While Ceph Dashboard might work in older browsers, we cannot guarantee it and
recommend you to update your browser to the latest version.</p>
</div>
</div>
<div class="section" id="id4">
<h2>如何启用<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
<p>If you have installed <code class="docutils literal notranslate"><span class="pre">ceph-mgr-dashboard</span></code> from distribution packages, the
package management system should have taken care of installing all the required
dependencies.</p>
<p>If you’re installing Ceph from source and want to start the dashboard from your
development environment, please see the files <code class="docutils literal notranslate"><span class="pre">README.rst</span></code> and <code class="docutils literal notranslate"><span class="pre">HACKING.rst</span></code>
in directory <code class="docutils literal notranslate"><span class="pre">src/pybind/mgr/dashboard</span></code> of the source code.</p>
<p>Within a running Ceph cluster, the Ceph Manager Dashboard is enabled with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph mgr module enable dashboard
</pre></div>
</div>
</div>
<div class="section" id="id5">
<h2>配置<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
<div class="section" id="ssl-tls">
<span id="dashboard-ssl-tls-support"></span><h3>SSL/TLS 支持<a class="headerlink" href="#ssl-tls" title="Permalink to this headline">¶</a></h3>
<p>All HTTP connections to the dashboard are secured with SSL/TLS by default.</p>
<p>To get the dashboard up and running quickly, you can generate and install a
self-signed certificate using the following built-in command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard create-self-signed-cert
</pre></div>
</div>
<p>Note that most web browsers will complain about such self-signed certificates
and require explicit confirmation before establishing a secure connection to the
dashboard.</p>
<p>To properly secure a deployment and to remove the certificate warning, a
certificate that is issued by a certificate authority (CA) should be used.</p>
<p>For example, a key pair can be generated with a command similar to:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ openssl req -new -nodes -x509 \
  -subj &quot;/O=IT/CN=ceph-mgr-dashboard&quot; -days 3650 \
  -keyout dashboard.key -out dashboard.crt -extensions v3_ca
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">dashboard.crt</span></code> file should then be signed by a CA. Once that is done, you
can enable it for all Ceph manager instances by running the following commands:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-ssl-certificate -i dashboard.crt
$ ceph dashboard set-ssl-certificate-key -i dashboard.key
</pre></div>
</div>
<p>If different certificates are desired for each manager instance for some reason,
the name of the instance can be included as follows (where <code class="docutils literal notranslate"><span class="pre">$name</span></code> is the name
of the <code class="docutils literal notranslate"><span class="pre">ceph-mgr</span></code> instance, usually the hostname):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-ssl-certificate $name -i dashboard.crt
$ ceph dashboard set-ssl-certificate-key $name -i dashboard.key
</pre></div>
</div>
<p>SSL can also be disabled by setting this configuration value:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config set mgr mgr/dashboard/ssl false
</pre></div>
</div>
<p>This might be useful if the dashboard will be running behind a proxy which does
not support SSL for its upstream servers or other situations where SSL is not
wanted or required. See <a class="reference internal" href="#dashboard-proxy-configuration"><span class="std std-ref">代理配置</span></a> for more details.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Use caution when disabling SSL as usernames and passwords will be sent to the
dashboard unencrypted.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You need to restart the Ceph manager processes manually after changing the SSL
certificate and key. This can be accomplished by either running <code class="docutils literal notranslate"><span class="pre">ceph</span> <span class="pre">mgr</span>
<span class="pre">fail</span> <span class="pre">mgr</span></code> or by disabling and re-enabling the dashboard module (which also
triggers the manager to respawn itself):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph mgr module disable dashboard
$ ceph mgr module enable dashboard
</pre></div>
</div>
</div>
</div>
<div class="section" id="dashboard-host-name-and-port">
<span id="id6"></span><h3>主机名和端口<a class="headerlink" href="#dashboard-host-name-and-port" title="Permalink to this headline">¶</a></h3>
<p>Like most web applications, dashboard binds to a TCP/IP address and TCP port.</p>
<p>By default, the <code class="docutils literal notranslate"><span class="pre">ceph-mgr</span></code> daemon hosting the dashboard (i.e., the currently
active manager) will bind to TCP port 8443 or 8080 when SSL is disabled.</p>
<p>If no specific address has been configured, the web app will bind to <code class="docutils literal notranslate"><span class="pre">::</span></code>,
which corresponds to all available IPv4 and IPv6 addresses.</p>
<p>These defaults can be changed via the configuration key facility on a
cluster-wide level (so they apply to all manager instances) as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config set mgr mgr/dashboard/server_addr $IP
$ ceph config set mgr mgr/dashboard/server_port $PORT
$ ceph config set mgr mgr/dashboard/ssl_server_port $PORT
</pre></div>
</div>
<p>Since each <code class="docutils literal notranslate"><span class="pre">ceph-mgr</span></code> hosts its own instance of dashboard, it may also be
necessary to configure them separately. The IP address and port for a specific
manager instance can be changed with the following commands:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config set mgr mgr/dashboard/$name/server_addr $IP
$ ceph config set mgr mgr/dashboard/$name/server_port $PORT
$ ceph config set mgr mgr/dashboard/$name/ssl_server_port $PORT
</pre></div>
</div>
<p>Replace <code class="docutils literal notranslate"><span class="pre">$name</span></code> with the ID of the ceph-mgr instance hosting the dashboard web
app.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The command <code class="docutils literal notranslate"><span class="pre">ceph</span> <span class="pre">mgr</span> <span class="pre">services</span></code> will show you all endpoints that are
currently configured. Look for the <code class="docutils literal notranslate"><span class="pre">dashboard</span></code> key to obtain the URL for
accessing the dashboard.</p>
</div>
</div>
<div class="section" id="id7">
<h3>用户名和密码<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<p>为了能登录进去，你需要创建用户帐户并给他关联至少一个角色。我们预定义了一系列<em>系统角色</em>，可以直接使用。更多细节请参考<a class="reference internal" href="#id12">用户和角色管理</a>一节。</p>
<p>要创建拥有 administrator 角色的用户可以用下面的命令：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-create &lt;username&gt; -i &lt;file-containing-password&gt; administrator
</pre></div>
</div>
</div>
<div class="section" id="account-lock-out">
<h3>Account Lock-out<a class="headerlink" href="#account-lock-out" title="Permalink to this headline">¶</a></h3>
<p>It disables a user account if a user repeatedly enters the wrong credentials
for multiple times. It is enabled by default to prevent brute-force or dictionary
attacks. The user can get or set the default number of lock-out attempts using
these commands respectively:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard get-account-lockout-attempts
$ ceph dashboard set-account-lockout-attempts &lt;value:int&gt;
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This feature can be disabled by setting the default number of lock-out attempts to 0.
However, by disabling this feature, the account is more vulnerable to brute-force or
dictionary based attacks. This can be disabled by:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-account-lockout-attempts 0
</pre></div>
</div>
</div>
</div>
<div class="section" id="enable-a-locked-user">
<h3>Enable a Locked User<a class="headerlink" href="#enable-a-locked-user" title="Permalink to this headline">¶</a></h3>
<p>If a user account is disabled as a result of multiple invalid login attempts, then
it needs to be manually enabled by the administrator. This can be done by the following
command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-enable &lt;username&gt;
</pre></div>
</div>
</div>
<div class="section" id="id8">
<h3>访问仪表盘<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<p>You can now access the dashboard using your (JavaScript-enabled) web browser, by
pointing it to any of the host names or IP addresses and the selected TCP port
where a manager instance is running: e.g., <code class="docutils literal notranslate"><span class="pre">http(s)://&lt;$IP&gt;:&lt;$PORT&gt;/</span></code>.</p>
<p>The dashboard page displays and requests a previously defined username and
password.</p>
</div>
<div class="section" id="dashboard-enabling-object-gateway">
<span id="id9"></span><h3>启用对象网关管理前端<a class="headerlink" href="#dashboard-enabling-object-gateway" title="Permalink to this headline">¶</a></h3>
<p>When RGW is deployed with cephadm, the RGW credentials used by the
dashboard will be automatically configured. You can also manually force the
credentials to be set up with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-rgw-credentials
</pre></div>
</div>
<p>This will create an RGW user with uid <code class="docutils literal notranslate"><span class="pre">dashboard</span></code> for each realm in
the system.</p>
<p>If you’ve configured a custom ‘admin’ resource in your RGW admin API, you should set it here also:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-rgw-api-admin-resource &lt;admin_resource&gt;
</pre></div>
</div>
<p>If you are using a self-signed certificate in your Object Gateway setup,
you should disable certificate verification in the dashboard to avoid refused
connections, e.g. caused by certificates signed by unknown CA or not matching
the host name:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-rgw-api-ssl-verify False
</pre></div>
</div>
<p>If the Object Gateway takes too long to process requests and the dashboard runs
into timeouts, you can set the timeout value to your needs:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-rest-requests-timeout &lt;seconds&gt;
</pre></div>
</div>
<p>The default value is 45 seconds.</p>
</div>
<div class="section" id="iscsi">
<span id="dashboard-iscsi-management"></span><h3>启用 iSCSI 的管理<a class="headerlink" href="#iscsi" title="Permalink to this headline">¶</a></h3>
<p>The Ceph Dashboard can manage iSCSI targets using the REST API provided by the
<code class="docutils literal notranslate"><span class="pre">rbd-target-api</span></code> service of the <a class="reference internal" href="../../rbd/iscsi-overview/#ceph-iscsi"><span class="std std-ref">Ceph iSCSI Gateway</span></a>. Please make sure that it is
installed and enabled on the iSCSI gateways.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The iSCSI management functionality of Ceph Dashboard depends on the latest
version 3 of the <a class="reference external" href="https://github.com/ceph/ceph-iscsi">ceph-iscsi</a> project.
Make sure that your operating system provides the correct version, otherwise
the dashboard will not enable the management features.</p>
</div>
<p>If the <code class="docutils literal notranslate"><span class="pre">ceph-iscsi</span></code> REST API is configured in HTTPS mode and its using a self-signed
certificate, you need to configure the dashboard to avoid SSL certificate
verification when accessing ceph-iscsi API.</p>
<p>To disable API SSL verification run the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-iscsi-api-ssl-verification false
</pre></div>
</div>
<p>The available iSCSI gateways must be defined using the following commands:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard iscsi-gateway-list
$ # Gateway URL format for a new gateway: &lt;scheme&gt;://&lt;username&gt;:&lt;password&gt;@&lt;host&gt;[:port]
$ ceph dashboard iscsi-gateway-add -i &lt;file-containing-gateway-url&gt; [&lt;gateway_name&gt;]
$ ceph dashboard iscsi-gateway-rm &lt;gateway_name&gt;
</pre></div>
</div>
</div>
<div class="section" id="grafana">
<span id="dashboard-grafana"></span><h3>允许嵌入 Grafana 仪表盘<a class="headerlink" href="#grafana" title="Permalink to this headline">¶</a></h3>
<p><a class="reference external" href="https://grafana.com/">Grafana</a> pulls data from <a class="reference external" href="https://prometheus.io/">Prometheus</a>. Although
Grafana can use other data sources, the Grafana dashboards we provide contain
queries that are specific to Prometheus. Our Grafana dashboards therefore
require Prometheus as the data source. The Ceph <a class="reference internal" href="../prometheus/#mgr-prometheus"><span class="std std-ref">Prometheus 模块</span></a>
module exports its data in the Prometheus exposition format. These Grafana
dashboards rely on metric names from the Prometheus module and <a class="reference external" href="https://prometheus.io/docs/guides/node-exporter/">Node exporter</a>. The Node exporter is a
separate application that provides machine metrics.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Prometheus’ security model presumes that untrusted users have access to the
Prometheus HTTP endpoint and logs. Untrusted users have access to all the
(meta)data Prometheus collects that is contained in the database, plus a
variety of operational and debugging information.</p>
<p>However, Prometheus’ HTTP API is limited to read-only operations.
Configurations can <em>not</em> be changed using the API and secrets are not
exposed. Moreover, Prometheus has some built-in measures to mitigate the
impact of denial of service attacks.</p>
<p>Please see <cite>Prometheus’ Security model
&lt;https://prometheus.io/docs/operating/security/&gt;</cite> for more detailed
information.</p>
</div>
<div class="section" id="installation-and-configuration-using-cephadm">
<h4>Installation and Configuration using cephadm<a class="headerlink" href="#installation-and-configuration-using-cephadm" title="Permalink to this headline">¶</a></h4>
<p>Grafana and Prometheus can be installed using <a class="reference internal" href="../../cephadm/#cephadm"><span class="std std-ref">Cephadm</span></a>. They will
automatically be configured by <code class="docutils literal notranslate"><span class="pre">cephadm</span></code>. Please see
<a class="reference internal" href="../../cephadm/services/monitoring/#mgr-cephadm-monitoring"><span class="std std-ref">Monitoring Services</span></a> documentation for more details on how to use
<code class="docutils literal notranslate"><span class="pre">cephadm</span></code> for installing and configuring Prometheus and Grafana.</p>
</div>
<div class="section" id="manual-installation-and-configuration">
<h4>Manual Installation and Configuration<a class="headerlink" href="#manual-installation-and-configuration" title="Permalink to this headline">¶</a></h4>
<p>The following process describes how to configure Grafana and Prometheus
manually. After you have installed Prometheus, Grafana, and the Node exporter
on appropriate hosts, proceed with the following steps.</p>
<ol class="arabic">
<li><p>Enable the Ceph Exporter which comes as Ceph Manager module by running:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph mgr module enable prometheus
</pre></div>
</div>
<p>More details can be found in the documentation of the <a class="reference internal" href="../prometheus/#mgr-prometheus"><span class="std std-ref">Prometheus 模块</span></a>.</p>
</li>
<li><p>Add the corresponding scrape configuration to Prometheus. This may look
like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">global</span><span class="p">:</span>
  <span class="n">scrape_interval</span><span class="p">:</span> <span class="mi">5</span><span class="n">s</span>

<span class="n">scrape_configs</span><span class="p">:</span>
  <span class="o">-</span> <span class="n">job_name</span><span class="p">:</span> <span class="s1">&#39;prometheus&#39;</span>
    <span class="n">static_configs</span><span class="p">:</span>
      <span class="o">-</span> <span class="n">targets</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;localhost:9090&#39;</span><span class="p">]</span>
  <span class="o">-</span> <span class="n">job_name</span><span class="p">:</span> <span class="s1">&#39;ceph&#39;</span>
    <span class="n">static_configs</span><span class="p">:</span>
      <span class="o">-</span> <span class="n">targets</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;localhost:9283&#39;</span><span class="p">]</span>
  <span class="o">-</span> <span class="n">job_name</span><span class="p">:</span> <span class="s1">&#39;node-exporter&#39;</span>
    <span class="n">static_configs</span><span class="p">:</span>
      <span class="o">-</span> <span class="n">targets</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;localhost:9100&#39;</span><span class="p">]</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Please note that in the above example, Prometheus is configured
to scrape data from itself (port 9090), the Ceph manager module
<cite>prometheus</cite> (port 9283), which exports Ceph internal data, and the Node
Exporter (port 9100), which provides OS and hardware metrics for each host.</p>
<p>Depending on your configuration, you may need to change the hostname in
or add additional configuration entries for the Node
Exporter. It is unlikely that you will need to change the default TCP ports.</p>
<p>Moreover, you don’t <em>need</em> to have more than one target for Ceph specific
data, provided by the <cite>prometheus</cite> mgr module. But it is recommended to
configure Prometheus to scrape Ceph specific data from all existing Ceph
managers. This enables a built-in high availability mechanism, so that
services run on a manager host will be restarted automatically on a different
manager host if one Ceph Manager goes down.</p>
</div>
</li>
<li><p>Add Prometheus as data source to Grafana <a class="reference external" href="https://grafana.com/docs/grafana/latest/features/datasources/add-a-data-source/">using the Grafana Web UI</a>.</p></li>
<li><p>Install the <cite>vonage-status-panel and grafana-piechart-panel</cite> plugins using:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">grafana</span><span class="o">-</span><span class="n">cli</span> <span class="n">plugins</span> <span class="n">install</span> <span class="n">vonage</span><span class="o">-</span><span class="n">status</span><span class="o">-</span><span class="n">panel</span>
<span class="n">grafana</span><span class="o">-</span><span class="n">cli</span> <span class="n">plugins</span> <span class="n">install</span> <span class="n">grafana</span><span class="o">-</span><span class="n">piechart</span><span class="o">-</span><span class="n">panel</span>
</pre></div>
</div>
</li>
<li><p>Add Dashboards to Grafana:</p>
<p>Dashboards can be added to Grafana by importing dashboard JSON files.
Use the following command to download the JSON files:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">wget</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">raw</span><span class="o">.</span><span class="n">githubusercontent</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">ceph</span><span class="o">/</span><span class="n">ceph</span><span class="o">/</span><span class="n">master</span><span class="o">/</span><span class="n">monitoring</span><span class="o">/</span><span class="n">grafana</span><span class="o">/</span><span class="n">dashboards</span><span class="o">/&lt;</span><span class="n">Dashboard</span><span class="o">-</span><span class="n">name</span><span class="o">&gt;.</span><span class="n">json</span>
</pre></div>
</div>
<p>You can find various dashboard JSON files <a class="reference external" href="https://github.com/ceph/ceph/tree/master/monitoring/grafana/dashboards">here</a> .</p>
<p>For Example, for ceph-cluster overview you can use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">wget</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">raw</span><span class="o">.</span><span class="n">githubusercontent</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">ceph</span><span class="o">/</span><span class="n">ceph</span><span class="o">/</span><span class="n">master</span><span class="o">/</span><span class="n">monitoring</span><span class="o">/</span><span class="n">grafana</span><span class="o">/</span><span class="n">dashboards</span><span class="o">/</span><span class="n">ceph</span><span class="o">-</span><span class="n">cluster</span><span class="o">.</span><span class="n">json</span>
</pre></div>
</div>
<p>You may also author your own dashboards.</p>
</li>
<li><p>Configure anonymous mode in <code class="docutils literal notranslate"><span class="pre">/etc/grafana/grafana.ini</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">auth</span><span class="o">.</span><span class="n">anonymous</span><span class="p">]</span>
<span class="n">enabled</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">org_name</span> <span class="o">=</span> <span class="n">Main</span> <span class="n">Org</span><span class="o">.</span>
<span class="n">org_role</span> <span class="o">=</span> <span class="n">Viewer</span>
</pre></div>
</div>
<p>In newer versions of Grafana (starting with 6.2.0-beta1) a new setting named
<code class="docutils literal notranslate"><span class="pre">allow_embedding</span></code> has been introduced. This setting must be explicitly
set to <code class="docutils literal notranslate"><span class="pre">true</span></code> for the Grafana integration in Ceph Dashboard to work, as the
default is <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">security</span><span class="p">]</span>
<span class="n">allow_embedding</span> <span class="o">=</span> <span class="n">true</span>
</pre></div>
</div>
</li>
</ol>
</div>
<div class="section" id="enabling-rbd-image-monitoring">
<h4>Enabling RBD-Image monitoring<a class="headerlink" href="#enabling-rbd-image-monitoring" title="Permalink to this headline">¶</a></h4>
<p>Monitoring of RBD images is disabled by default, as it can significantly impact
performance. For more information please see <a class="reference internal" href="../prometheus/#prometheus-rbd-io-statistics"><span class="std std-ref">RBD IO 统计</span></a>.
When disabled, the overview and details dashboards will be empty in Grafana and
metrics will not be visible in Prometheus.</p>
</div>
<div class="section" id="id10">
<h4>仪表盘的配置<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h4>
<p>After you have set up Grafana and Prometheus, you will need to configure the
connection information that the Ceph Dashboard will use to access Grafana.</p>
<p>You need to tell the dashboard on which URL the Grafana instance is
running/deployed:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-grafana-api-url &lt;grafana-server-url&gt;  # default: &#39;&#39;
</pre></div>
</div>
<p>The format of url is : <cite>&lt;protocol&gt;:&lt;IP-address&gt;:&lt;port&gt;</cite></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The Ceph Dashboard embeds Grafana dashboards via <code class="docutils literal notranslate"><span class="pre">iframe</span></code> HTML elements.
If Grafana is configured without SSL/TLS support, most browsers will block the
embedding of insecure content if SSL support is
enabled for the dashboard (which is the default). If you
can’t see the embedded Grafana dashboards after enabling them as outlined
above, check your browser’s documentation on how to unblock mixed content.
Alternatively, consider enabling SSL/TLS support in Grafana.</p>
</div>
<p>If you are using a self-signed certificate for Grafana,
disable certificate verification in the dashboard to avoid refused connections,
which can be a result of certificates signed by an unknown CA or that do not
matchn the host name:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-grafana-api-ssl-verify False
</pre></div>
</div>
<p>You can also access Grafana directly to monitor your cluster.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Ceph Dashboard configuration information can also be unset. For example, to
clear the Grafana API URL we configured above:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard reset-grafana-api-url
</pre></div>
</div>
</div>
</div>
<div class="section" id="alternative-url-for-browsers">
<h4>Alternative URL for Browsers<a class="headerlink" href="#alternative-url-for-browsers" title="Permalink to this headline">¶</a></h4>
<p>The Ceph Dashboard backend requires the Grafana URL to be able to verify the
existence of Grafana Dashboards before the frontend even loads them. Due to the
nature of how Grafana is implemented in Ceph Dashboard, this means that two
working connections are required in order to be able to see Grafana graphs in
Ceph Dashboard:</p>
<ul class="simple">
<li><p>The backend (Ceph Mgr module) needs to verify the existence of the requested
graph. If this request succeeds, it lets the frontend know that it can safely
access Grafana.</p></li>
<li><p>The frontend then requests the Grafana graphs directly from the user’s
browser using an iframe. The Grafana instance is accessed directly without any
detour through Ceph Dashboard.</p></li>
</ul>
<p>Now, it might be the case that your environment makes it difficult for the
user’s browser to directly access the URL configured in Ceph Dashboard. To solve
this issue, a separate URL can be configured which will solely be used to tell
the frontend (the user’s browser) which URL it should use to access Grafana.
This setting won’t ever be changed automatically, unlike the GRAFANA_API_URL
which is set by <a class="reference internal" href="../../cephadm/#cephadm"><span class="std std-ref">Cephadm</span></a> (only if cephadm is used to deploy monitoring
services).</p>
<p>To change the URL that is returned to the frontend issue the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-grafana-frontend-api-url &lt;grafana-server-url&gt;
</pre></div>
</div>
<p>If no value is set for that option, it will simply fall back to the value of the
GRAFANA_API_URL option. If set, it will instruct the browser to use this URL to
access Grafana.</p>
</div>
</div>
<div class="section" id="single-sign-on-sso">
<span id="dashboard-sso-support"></span><h3>启用单点登录（ Single Sign-On, SSO ）<a class="headerlink" href="#single-sign-on-sso" title="Permalink to this headline">¶</a></h3>
<p>The Ceph Dashboard supports external authentication of users via the
<a class="reference external" href="https://en.wikipedia.org/wiki/SAML_2.0">SAML 2.0</a> protocol. You need to
first create user accounts and associate them with desired roles, as
authorization is performed by the Dashboard. However, the authentication
process can be performed by an existing Identity Provider (IdP).</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Ceph Dashboard SSO support relies on onelogin’s
<a class="reference external" href="https://pypi.org/project/python-saml/">python-saml</a> library.
Please ensure that this library is installed on your system, either by using
your distribution’s package management or via Python’s <cite>pip</cite> installer.</p>
</div>
<p>To configure SSO on Ceph Dashboard, you should use the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard sso setup saml2 &lt;ceph_dashboard_base_url&gt; &lt;idp_metadata&gt; {&lt;idp_username_attribute&gt;} {&lt;idp_entity_id&gt;} {&lt;sp_x_509_cert&gt;} {&lt;sp_private_key&gt;}
</pre></div>
</div>
<p>参数：</p>
<ul class="simple">
<li><p><strong>&lt;ceph_dashboard_base_url&gt;</strong>: Base URL where Ceph Dashboard is accessible (e.g., <cite>https://cephdashboard.local</cite>)</p></li>
<li><p><strong>&lt;idp_metadata&gt;</strong>: URL to remote (<cite>http://</cite>, <cite>https://</cite>) or local (<cite>file://</cite>) path or content of the IdP metadata XML (e.g., <cite>https://myidp/metadata</cite>, <cite>file:///home/myuser/metadata.xml</cite>).</p></li>
<li><p><strong>&lt;idp_username_attribute&gt;</strong> <em>(optional)</em>: Attribute that should be used to get the username from the authentication response. Defaults to <cite>uid</cite>.</p></li>
<li><p><strong>&lt;idp_entity_id&gt;</strong> <em>(optional)</em>: Use this when more than one entity id exists on the IdP metadata.</p></li>
<li><p><strong>&lt;sp_x_509_cert&gt; / &lt;sp_private_key&gt;</strong> <em>(optional)</em>: File path of the certificate that should be used by Ceph Dashboard (Service Provider) for signing and encryption (these file paths should be accessible from the active ceph-mgr instance).</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The issuer value of SAML requests will follow this pattern:  <strong>&lt;ceph_dashboard_base_url&gt;</strong>/auth/saml2/metadata</p>
</div>
<p>To display the current SAML 2.0 configuration, use the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard sso show saml2
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>For more information about <cite>onelogin_settings</cite>, please check the <a class="reference external" href="https://github.com/onelogin/python-saml">onelogin documentation</a>.</p>
</div>
<p>To disable SSO:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard sso disable
</pre></div>
</div>
<p>To check if SSO is enabled:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard sso status
</pre></div>
</div>
<p>To enable SSO:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard sso enable saml2
</pre></div>
</div>
</div>
<div class="section" id="dashboard-alerting">
<span id="id11"></span><h3>启用 Prometheus 报警<a class="headerlink" href="#dashboard-alerting" title="Permalink to this headline">¶</a></h3>
<p>To use Prometheus for alerting you must define <a class="reference external" href="https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules">alerting rules</a>.
These are managed by the <a class="reference external" href="https://prometheus.io/docs/alerting/alertmanager">Alertmanager</a>.
If you are not yet using the Alertmanager, <a class="reference external" href="https://github.com/prometheus/alertmanager#install">install it</a> as it receives
and manages alerts from Prometheus.</p>
<p>The Alertmanager capabilities can be consumed by the dashboard in three different
ways:</p>
<ol class="arabic simple">
<li><p>Use the notification receiver of the dashboard.</p></li>
<li><p>Use the Prometheus Alertmanager API.</p></li>
<li><p>Use both sources simultaneously.</p></li>
</ol>
<p>这三种方法都能把告警通知到你。如果你两个源都用了，也不会被通知两次，但起码你也得用 Alertmanager API 才能保持清静。</p>
<ol class="arabic">
<li><p>Use the notification receiver of the dashboard:</p>
<p>This allows you to get notifications as <a class="reference external" href="https://prometheus.io/docs/alerting/configuration/">configured</a> from the Alertmanager.
You will get notified inside the dashboard once a notification is send out,
but you are not able to manage alerts.</p>
</li>
</ol>
<blockquote>
<div><p>Add the dashboard receiver and the new route to your Alertmanager
configuration. This should look like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">route</span><span class="p">:</span>
  <span class="n">receiver</span><span class="p">:</span> <span class="s1">&#39;ceph-dashboard&#39;</span>
<span class="o">...</span>
<span class="n">receivers</span><span class="p">:</span>
  <span class="o">-</span> <span class="n">name</span><span class="p">:</span> <span class="s1">&#39;ceph-dashboard&#39;</span>
    <span class="n">webhook_configs</span><span class="p">:</span>
    <span class="o">-</span> <span class="n">url</span><span class="p">:</span> <span class="s1">&#39;&lt;url-to-dashboard&gt;/api/prometheus_receiver&#39;</span>
</pre></div>
</div>
<p>Ensure that the Alertmanager considers your SSL certificate in terms
of the dashboard as valid. For more information about the correct
configuration checkout the <a class="reference external" href="https://prometheus.io/docs/alerting/configuration/#%3Chttp_config%3E">&lt;http_config&gt; documentation</a>.</p>
</div></blockquote>
<ol class="arabic simple" start="2">
<li><p>Use the API of the Prometheus Alertmanager</p></li>
</ol>
<blockquote>
<div><p>This allows you to manage alerts and silences. This will enable the “Active
Alerts”, “All Alerts” as well as the “Silences” tabs in the “Monitoring”
section of the “Cluster” menu entry.</p>
<p>Alerts can be sorted by name, job, severity, state and start time.
Unfortunately it’s not possible to know when an alert was sent out through a
notification by the Alertmanager based on your configuration, that’s why the
dashboard will notify the user on any visible change to an alert and will
notify the changed alert.</p>
<p>Silences can be sorted by id, creator, status, start, updated and end time.
Silences can be created in various ways, it’s also possible to expire them.</p>
<ol class="arabic simple">
<li><p>Create from scratch</p></li>
<li><p>Based on a selected alert</p></li>
<li><p>Recreate from expired silence</p></li>
<li><p>Update a silence (which will recreate and expire it (default Alertmanager behaviour))</p></li>
</ol>
<p>To use it, specify the host and port of the Alertmanager server:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-alertmanager-api-host &lt;alertmanager-host:port&gt;  # default: &#39;&#39;
</pre></div>
</div>
<p>For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-alertmanager-api-host &#39;http://localhost:9093&#39;
</pre></div>
</div>
<p>To be able to see all configured alerts, you will need to configure the URL to
the Prometheus API. Using this API, the UI will also help you in verifying
that a new silence will match a corresponding alert.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-prometheus-api-host &lt;prometheus-host:port&gt;  # default: &#39;&#39;
</pre></div>
</div>
<p>For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-prometheus-api-host &#39;http://localhost:9090&#39;
</pre></div>
</div>
<p>After setting up the hosts, you have to refresh your the dashboard in your browser window.</p>
</div></blockquote>
<ol class="arabic simple" start="3">
<li><p>Use both methods</p></li>
</ol>
<blockquote>
<div><p>The behaviors of both methods are configured in a way that they
should not disturb each other, through annoying duplicated notifications
may pop up.</p>
</div></blockquote>
<p>If you are using a self-signed certificate in your Prometheus or your
Alertmanager setup, you should disable certificate verification in the
dashboard to avoid refused connections caused by certificates signed by
an unknown CA or that do not match the host name.</p>
<ul>
<li><p>For Prometheus:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-prometheus-api-ssl-verify False
</pre></div>
</div>
</li>
<li><p>For Alertmanager:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-alertmanager-api-ssl-verify False
</pre></div>
</div>
</li>
</ul>
</div>
</div>
<div class="section" id="dashboard-user-role-management">
<span id="id12"></span><h2>用户和角色管理<a class="headerlink" href="#dashboard-user-role-management" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id13">
<h3>密码策略<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
<p>密码策略功能默认就是启用的，要检查这些：</p>
<ul class="simple">
<li><p>Is the password longer than N characters?</p></li>
<li><p>Are the old and new password the same?</p></li>
</ul>
<p>The password policy feature can be switched on or off completely:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-pwd-policy-enabled &lt;true|false&gt;
</pre></div>
</div>
<p>The following individual checks can be switched on or off:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-pwd-policy-check-length-enabled &lt;true|false&gt;
$ ceph dashboard set-pwd-policy-check-oldpwd-enabled &lt;true|false&gt;
$ ceph dashboard set-pwd-policy-check-username-enabled &lt;true|false&gt;
$ ceph dashboard set-pwd-policy-check-exclusion-list-enabled &lt;true|false&gt;
$ ceph dashboard set-pwd-policy-check-complexity-enabled &lt;true|false&gt;
$ ceph dashboard set-pwd-policy-check-sequential-chars-enabled &lt;true|false&gt;
$ ceph dashboard set-pwd-policy-check-repetitive-chars-enabled &lt;true|false&gt;
</pre></div>
</div>
<p>Additionally the following options are available to configure password
policy.</p>
<ul>
<li><p>The minimum password length (defaults to 8):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-pwd-policy-min-length &lt;N&gt;
</pre></div>
</div>
</li>
<li><p>The minimum password complexity (defaults to 10):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-pwd-policy-min-complexity &lt;N&gt;
</pre></div>
</div>
<p>The password complexity is calculated by classifying each character in
the password. The complexity count starts by 0. A character is rated by
the following rules in the given order.</p>
<ul class="simple">
<li><p>Increase by 1 if the character is a digit.</p></li>
<li><p>Increase by 1 if the character is a lower case ASCII character.</p></li>
<li><p>Increase by 2 if the character is an upper case ASCII character.</p></li>
<li><p>Increase by 3 if the character is a special character like <code class="docutils literal notranslate"><span class="pre">!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?&#64;[\]^_`{|}~</span></code>.</p></li>
<li><p>Increase by 5 if the character has not been classified by one of the previous rules.</p></li>
</ul>
</li>
<li><p>一系列逗号分隔的单词，密码里不能有这些单词：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-pwd-policy-exclusion-list &lt;word&gt;[,...]
</pre></div>
</div>
</li>
</ul>
</div>
<div class="section" id="id14">
<h3>用户帐户<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
<p>Ceph Dashboard supports managing multiple user accounts. Each user account
consists of a username, a password (stored in encrypted form using <code class="docutils literal notranslate"><span class="pre">bcrypt</span></code>),
an optional name, and an optional email address.</p>
<p>If a new user is created via Web UI, it is possible to set an option that this
user must assign a new password when they log in for the first time.</p>
<p>User accounts are stored in the monitors’ configuration database, and are
available to all <code class="docutils literal notranslate"><span class="pre">ceph-mgr</span></code> instances.</p>
<p>We provide a set of CLI commands to manage user accounts:</p>
<ul>
<li><p><em>Show User(s)</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-show [&lt;username&gt;]
</pre></div>
</div>
</li>
<li><p><em>Create User</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-create [--enabled] [--force-password] [--pwd_update_required] &lt;username&gt; -i &lt;file-containing-password&gt; [&lt;rolename&gt;] [&lt;name&gt;] [&lt;email&gt;] [&lt;pwd_expiration_date&gt;]
</pre></div>
</div>
<p>To bypass the password policy checks use the <cite>force-password</cite> option.
Use the option <cite>pwd_update_required</cite> so that a newly created user has
to change their password after the first login.</p>
</li>
<li><p><em>Delete User</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-delete &lt;username&gt;
</pre></div>
</div>
</li>
<li><p><em>Change Password</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-set-password [--force-password] &lt;username&gt; -i &lt;file-containing-password&gt;
</pre></div>
</div>
</li>
<li><p><em>Change Password Hash</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-set-password-hash &lt;username&gt; -i &lt;file-containing-password-hash&gt;
</pre></div>
</div>
<p>The hash must be a bcrypt hash and salt, e.g. <code class="docutils literal notranslate"><span class="pre">$2b$12$Pt3Vq/rDt2y9glTPSV.VFegiLkQeIpddtkhoFetNApYmIJOY8gau2</span></code>.
This can be used to import users from an external database.</p>
</li>
<li><p><em>Modify User (name, and email)</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-set-info &lt;username&gt; &lt;name&gt; &lt;email&gt;
</pre></div>
</div>
</li>
<li><p><em>Disable User</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-disable &lt;username&gt;
</pre></div>
</div>
</li>
<li><p><em>Enable User</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-enable &lt;username&gt;
</pre></div>
</div>
</li>
</ul>
</div>
<div class="section" id="id15">
<h3>用户角色和权限<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
<p>User accounts are associated with a set of roles that define which
dashboard functionality can be accessed.</p>
<p>The Dashboard functionality/modules are grouped within a <em>security scope</em>.
Security scopes are predefined and static. The current available security
scopes are:</p>
<ul class="simple">
<li><p><strong>hosts</strong>: includes all features related to the <code class="docutils literal notranslate"><span class="pre">Hosts</span></code> menu
entry.</p></li>
<li><p><strong>config-opt</strong>: includes all features related to management of Ceph
configuration options.</p></li>
<li><p><strong>pool</strong>: includes all features related to pool management.</p></li>
<li><p><strong>osd</strong>: includes all features related to OSD management.</p></li>
<li><p><strong>monitor</strong>: includes all features related to monitor management.</p></li>
<li><p><strong>rbd-image</strong>: includes all features related to RBD image
management.</p></li>
<li><p><strong>rbd-mirroring</strong>: includes all features related to RBD mirroring
management.</p></li>
<li><p><strong>iscsi</strong>: includes all features related to iSCSI management.</p></li>
<li><p><strong>rgw</strong>: includes all features related to RADOS Gateway (RGW) management.</p></li>
<li><p><strong>cephfs</strong>: includes all features related to CephFS management.</p></li>
<li><p><strong>nfs-ganesha</strong>: includes all features related to NFS Ganesha management.</p></li>
<li><p><strong>manager</strong>: include all features related to Ceph Manager
management.</p></li>
<li><p><strong>log</strong>: include all features related to Ceph logs management.</p></li>
<li><p><strong>grafana</strong>: include all features related to Grafana proxy.</p></li>
<li><p><strong>prometheus</strong>: include all features related to Prometheus alert management.</p></li>
<li><p><strong>dashboard-settings</strong>: allows to change dashboard settings.</p></li>
</ul>
<p>A <em>role</em> specifies a set of mappings between a <em>security scope</em> and a set of
<em>permissions</em>. There are four types of permissions:</p>
<ul class="simple">
<li><p><strong>read</strong></p></li>
<li><p><strong>create</strong></p></li>
<li><p><strong>update</strong></p></li>
<li><p><strong>delete</strong></p></li>
</ul>
<p>See below for an example of a role specification, in the form of a Python dictionary:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># example of a role</span>
<span class="p">{</span>
  <span class="s1">&#39;role&#39;</span><span class="p">:</span> <span class="s1">&#39;my_new_role&#39;</span><span class="p">,</span>
  <span class="s1">&#39;description&#39;</span><span class="p">:</span> <span class="s1">&#39;My new role&#39;</span><span class="p">,</span>
  <span class="s1">&#39;scopes_permissions&#39;</span><span class="p">:</span> <span class="p">{</span>
    <span class="s1">&#39;pool&#39;</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;read&#39;</span><span class="p">,</span> <span class="s1">&#39;create&#39;</span><span class="p">],</span>
    <span class="s1">&#39;rbd-image&#39;</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;read&#39;</span><span class="p">,</span> <span class="s1">&#39;create&#39;</span><span class="p">,</span> <span class="s1">&#39;update&#39;</span><span class="p">,</span> <span class="s1">&#39;delete&#39;</span><span class="p">]</span>
  <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The above role dictates that a user has <em>read</em> and <em>create</em> permissions for
features related to pool management, and has full permissions for
features related to RBD image management.</p>
<p>The Dashboard provides a set of predefined roles that we call
<em>system roles</em>, which can be used right away by a fresh Ceph Dashboard
installation.</p>
<p>The list of system roles are:</p>
<ul class="simple">
<li><p><strong>administrator</strong>: allows full permissions for all security scopes.</p></li>
<li><p><strong>read-only</strong>: allows <em>read</em> permission for all security scopes except
dashboard settings.</p></li>
<li><p><strong>block-manager</strong>: allows full permissions for <em>rbd-image</em>,
<em>rbd-mirroring</em>, and <em>iscsi</em> scopes.</p></li>
<li><p><strong>rgw-manager</strong>: allows full permissions for the <em>rgw</em> scope</p></li>
<li><p><strong>cluster-manager</strong>: allows full permissions for the <em>hosts</em>, <em>osd</em>,
<em>monitor</em>, <em>manager</em>, and <em>config-opt</em> scopes.</p></li>
<li><p><strong>pool-manager</strong>: allows full permissions for the <em>pool</em> scope.</p></li>
<li><p><strong>cephfs-manager</strong>: allows full permissions for the <em>cephfs</em> scope.</p></li>
</ul>
<p>The list of available roles can be retrieved with the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-role-show [&lt;rolename&gt;]
</pre></div>
</div>
<p>You can also use the CLI to create new roles. The available commands are the
following:</p>
<ul>
<li><p><em>Create Role</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-role-create &lt;rolename&gt; [&lt;description&gt;]
</pre></div>
</div>
</li>
<li><p><em>Delete Role</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-role-delete &lt;rolename&gt;
</pre></div>
</div>
</li>
<li><p><em>Add Scope Permissions to Role</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-role-add-scope-perms &lt;rolename&gt; &lt;scopename&gt; &lt;permission&gt; [&lt;permission&gt;...]
</pre></div>
</div>
</li>
<li><p><em>Delete Scope Permission from Role</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-role-del-scope-perms &lt;rolename&gt; &lt;scopename&gt;
</pre></div>
</div>
</li>
</ul>
<p>To assign roles to users, the following commands are available:</p>
<ul>
<li><p><em>Set User Roles</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-set-roles &lt;username&gt; &lt;rolename&gt; [&lt;rolename&gt;...]
</pre></div>
</div>
</li>
<li><p><em>Add Roles To User</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-add-roles &lt;username&gt; &lt;rolename&gt; [&lt;rolename&gt;...]
</pre></div>
</div>
</li>
<li><p><em>Delete Roles from User</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-del-roles &lt;username&gt; &lt;rolename&gt; [&lt;rolename&gt;...]
</pre></div>
</div>
</li>
</ul>
</div>
<div class="section" id="id16">
<h3>用户和定制角色创建实例<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
<p>In this section we show a full example of the commands that need to be used
in order to create a user account, that should be able to manage RBD images,
view and create Ceph pools, and have read-only access to any other scopes.</p>
<ol class="arabic">
<li><p><em>Create the user</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-create bob -i &lt;file-containing-password&gt;
</pre></div>
</div>
</li>
<li><p><em>Create role and specify scope permissions</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-role-create rbd/pool-manager
$ ceph dashboard ac-role-add-scope-perms rbd/pool-manager rbd-image read create update delete
$ ceph dashboard ac-role-add-scope-perms rbd/pool-manager pool read create
</pre></div>
</div>
</li>
<li><p><em>Associate roles to user</em>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-set-roles bob rbd/pool-manager read-only
</pre></div>
</div>
</li>
</ol>
</div>
</div>
<div class="section" id="dashboard-proxy-configuration">
<span id="id17"></span><h2>代理配置<a class="headerlink" href="#dashboard-proxy-configuration" title="Permalink to this headline">¶</a></h2>
<p>In a Ceph cluster with multiple ceph-mgr instances, only the dashboard running
on the currently active ceph-mgr daemon will serve incoming requests. Accessing
the dashboard’s TCP port on any of the other ceph-mgr instances that are
currently on standby will perform a HTTP redirect (303) to the currently active
manager’s dashboard URL. This way, you can point your browser to any of the
ceph-mgr instances in order to access the dashboard.</p>
<p>If you want to establish a fixed URL to reach the dashboard or if you don’t want
to allow direct connections to the manager nodes, you could set up a proxy that
automatically forwards incoming requests to the currently active ceph-mgr
instance.</p>
<div class="section" id="url">
<h3>配置一个 URL 前缀<a class="headerlink" href="#url" title="Permalink to this headline">¶</a></h3>
<p>如果要通过一个反向代理访问仪表盘，你可能想把它放到一个
URL 前缀之下。要让仪表盘使用内含自定义 URL 前缀的超链接，你可以设置 <code class="docutils literal notranslate"><span class="pre">url_prefix</span></code> 选项：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>ceph config set mgr mgr/dashboard/url_prefix $PREFIX
</pre></div>
</div>
<p>这样你就能在 <code class="docutils literal notranslate"><span class="pre">http://$IP:$PORT/$PREFIX/</span></code> 访问面板了。</p>
</div>
<div class="section" id="id18">
<h3>禁用重定向<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
<p>If the dashboard is behind a load-balancing proxy like <a class="reference external" href="https://www.haproxy.org/">HAProxy</a>
you might want to disable the redirection behaviour to prevent situations that
internal (unresolvable) URL’s are published to the frontend client. Use the
following command to get the dashboard to respond with a HTTP error (500 by default)
instead of redirecting to the active dashboard:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config set mgr mgr/dashboard/standby_behaviour &quot;error&quot;
</pre></div>
</div>
<p>To reset the setting to the default redirection behaviour, use the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config set mgr mgr/dashboard/standby_behaviour &quot;redirect&quot;
</pre></div>
</div>
</div>
<div class="section" id="id19">
<h3>配置错误状态码<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3>
<p>When redirection is disabled, you may want to customize the HTTP status
code of standby dashboards. To do so you need to run the command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config set mgr mgr/dashboard/standby_error_status_code 503
</pre></div>
</div>
</div>
<div class="section" id="id20">
<h3>HAProxy 配置实例<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h3>
<p>Below you will find an example configuration for SSL/TLS pass through using
<a class="reference external" href="https://www.haproxy.org/">HAProxy</a>.</p>
<p>Please note that the configuration works under the following conditions.
If the dashboard fails over, the front-end client might receive a HTTP redirect
(303) response and will be redirected to an unresolvable host. This happens when
the failover occurs during two HAProxy health checks. In this situation the
previously active dashboard node will now respond with a 303 which points to
the new active node. To prevent that situation you should consider to disable
the redirection behaviour on standby nodes.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>defaults
  log global
  option log-health-checks
  timeout connect 5s
  timeout client 50s
  timeout server 450s

frontend dashboard_front
  mode http
  bind *:80
  option httplog
  redirect scheme https code 301 if !{ ssl_fc }

frontend dashboard_front_ssl
  mode tcp
  bind *:443
  option tcplog
  default_backend dashboard_back_ssl

backend dashboard_back_ssl
  mode tcp
  option httpchk GET /
  http-check expect status 200
  server x &lt;HOST&gt;:&lt;PORT&gt; check-ssl check verify none
  server y &lt;HOST&gt;:&lt;PORT&gt; check-ssl check verify none
  server z &lt;HOST&gt;:&lt;PORT&gt; check-ssl check verify none
</pre></div>
</div>
</div>
</div>
<div class="section" id="api">
<span id="dashboard-auditing"></span><h2>审计 API 请求<a class="headerlink" href="#api" title="Permalink to this headline">¶</a></h2>
<p>REST API 可以把 PUT 、 POST 、和 DELETE 请求记录到审计日志。此功能默认是禁用的，可以用下列命令启用：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-audit-api-enabled &lt;true|false&gt;
</pre></div>
</div>
<p>如果启用了，每个请求的下面几个参数都会被记录：</p>
<ul class="simple">
<li><p>from - The origin of the request, e.g. <a class="reference external" href="https://[::1]:44410">https://[::1]:44410</a></p></li>
<li><p>path - The REST API path, e.g. /api/auth</p></li>
<li><p>method - e.g. PUT, POST or DELETE</p></li>
<li><p>user - The name of the user, otherwise ‘None’</p></li>
</ul>
<p>The logging of the request payload (the arguments and their values) is enabled
by default. Execute the following command to disable this behaviour:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard set-audit-api-log-payload &lt;true|false&gt;
</pre></div>
</div>
<p>A log entry may look like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">2018</span><span class="o">-</span><span class="mi">10</span><span class="o">-</span><span class="mi">22</span> <span class="mi">15</span><span class="p">:</span><span class="mi">27</span><span class="p">:</span><span class="mf">01.302514</span> <span class="n">mgr</span><span class="o">.</span><span class="n">x</span> <span class="p">[</span><span class="n">INF</span><span class="p">]</span> <span class="p">[</span><span class="n">DASHBOARD</span><span class="p">]</span> <span class="n">from</span><span class="o">=</span><span class="s1">&#39;https://[::ffff:127.0.0.1]:37022&#39;</span> <span class="n">path</span><span class="o">=</span><span class="s1">&#39;/api/rgw/user/klaus&#39;</span> <span class="n">method</span><span class="o">=</span><span class="s1">&#39;PUT&#39;</span> <span class="n">user</span><span class="o">=</span><span class="s1">&#39;admin&#39;</span> <span class="n">params</span><span class="o">=</span><span class="s1">&#39;{&quot;max_buckets&quot;: &quot;1000&quot;, &quot;display_name&quot;: &quot;Klaus Mustermann&quot;, &quot;uid&quot;: &quot;klaus&quot;, &quot;suspended&quot;: &quot;0&quot;, &quot;email&quot;: &quot;klaus.mustermann@ceph.com&quot;}&#39;</span>
</pre></div>
</div>
</div>
<div class="section" id="nfs-ganesha">
<span id="dashboard-nfs-ganesha-management"></span><h2>NFS-Ganesha 的管理<a class="headerlink" href="#nfs-ganesha" title="Permalink to this headline">¶</a></h2>
<p>The dashboard requires enabling the NFS module which will be used to manage
NFS clusters and NFS exports. For more information check <a class="reference internal" href="../nfs/#mgr-nfs"><span class="std std-ref">CephFS &amp; RGW Exports over NFS</span></a>.</p>
</div>
<div class="section" id="plug-ins">
<h2>Plug-ins<a class="headerlink" href="#plug-ins" title="Permalink to this headline">¶</a></h2>
<p>Plug-ins extend the functionality of the Ceph Dashboard in a modular
and loosely coupled fashion.</p>
<div class="section" id="dashboard-feature-toggles">
<span id="id23"></span><h3>功能开关<a class="headerlink" href="#dashboard-feature-toggles" title="Permalink to this headline">¶</a></h3>
<p>This plug-in allows to enable or disable some features from the Ceph Dashboard
on-demand. When a feature becomes disabled:</p>
<ul class="simple">
<li><p>Its front-end elements (web pages, menu entries, charts, etc.) will become hidden.</p></li>
<li><p>Its associated REST API endpoints will reject any further requests (404, Not Found Error).</p></li>
</ul>
<p>The main purpose of this plug-in is to allow ad-hoc customizations of the workflows exposed
by the dashboard. Additionally, it could allow for dynamically enabling experimental
features with minimal configuration burden and no service impact.</p>
<p>The list of features that can be enabled/disabled is:</p>
<ul class="simple">
<li><dl class="simple">
<dt><strong>Block (RBD)</strong>:</dt><dd><ul>
<li><p>Image Management: <code class="docutils literal notranslate"><span class="pre">rbd</span></code></p></li>
<li><p>Mirroring: <code class="docutils literal notranslate"><span class="pre">mirroring</span></code></p></li>
<li><p>iSCSI: <code class="docutils literal notranslate"><span class="pre">iscsi</span></code></p></li>
</ul>
</dd>
</dl>
</li>
<li><p><strong>Filesystem (Cephfs)</strong>: <code class="docutils literal notranslate"><span class="pre">cephfs</span></code></p></li>
<li><p><strong>Objects (RGW)</strong>: <code class="docutils literal notranslate"><span class="pre">rgw</span></code> (including daemon, user and bucket management).</p></li>
<li><p><strong>NFS</strong>: <code class="docutils literal notranslate"><span class="pre">nfs-ganesha</span></code> exports.</p></li>
</ul>
<p>By default all features come enabled.</p>
<p>To retrieve a list of features and their current statuses:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard feature status
Feature &#39;cephfs&#39;: &#39;enabled&#39;
Feature &#39;iscsi&#39;: &#39;enabled&#39;
Feature &#39;mirroring&#39;: &#39;enabled&#39;
Feature &#39;rbd&#39;: &#39;enabled&#39;
Feature &#39;rgw&#39;: &#39;enabled&#39;
Feature &#39;nfs&#39;: &#39;enabled&#39;
</pre></div>
</div>
<p>To enable or disable the status of a single or multiple features:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard feature disable iscsi mirroring
Feature &#39;iscsi&#39;: disabled
Feature &#39;mirroring&#39;: disabled
</pre></div>
</div>
<p>After a feature status has changed, the API REST endpoints immediately respond to
that change, while for the front-end UI elements, it may take up to 20 seconds to
reflect it.</p>
</div>
<div class="section" id="dashboard-debug">
<span id="id24"></span><h3>调试<a class="headerlink" href="#dashboard-debug" title="Permalink to this headline">¶</a></h3>
<p>This plugin allows to customize the behaviour of the dashboard according to the
debug mode. It can be enabled, disabled or checked with the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard debug status
Debug: &#39;disabled&#39;
$ ceph dashboard debug enable
Debug: &#39;enabled&#39;
$ ceph dashboard debug disable
Debug: &#39;disabled&#39;
</pre></div>
</div>
<p>By default, it’s disabled. This is the recommended setting for production
deployments. If required, debug mode can be enabled without need of restarting.
Currently, disabled debug mode equals to CherryPy <code class="docutils literal notranslate"><span class="pre">production</span></code> environment,
while when enabled, it uses <code class="docutils literal notranslate"><span class="pre">test_suite</span></code> defaults (please refer to
<a class="reference external" href="https://docs.cherrypy.org/en/latest/config.html#environments">CherryPy Environments</a> for more
details).</p>
<p>It also adds request uuid (<code class="docutils literal notranslate"><span class="pre">unique_id</span></code>) to Cherrypy on versions that don’t
support this. It additionally prints the <code class="docutils literal notranslate"><span class="pre">unique_id</span></code> to error responses and
log messages.</p>
</div>
<div class="section" id="message-of-the-day-motd">
<span id="dashboard-motd"></span><h3>Message of the day (MOTD)<a class="headerlink" href="#message-of-the-day-motd" title="Permalink to this headline">¶</a></h3>
<p>Displays a configured <cite>message of the day</cite> at the top of the Ceph Dashboard.</p>
<p>The importance of a MOTD can be configured by its severity, which is
<cite>info</cite>, <cite>warning</cite> or <cite>danger</cite>. The MOTD can expire after a given time,
this means it will not be displayed in the UI anymore. Use the following
syntax to specify the expiration time: <cite>Ns|m|h|d|w</cite> for seconds, minutes,
hours, days and weeks. If the MOTD should expire after 2 hours, use <cite>2h</cite>
or <cite>5w</cite> for 5 weeks. Use <cite>0</cite> to configure a MOTD that does not expire.</p>
<p>To configure a MOTD, run the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard motd set &lt;severity:info|warning|danger&gt; &lt;expires&gt; &lt;message&gt;
</pre></div>
</div>
<p>To show the configured MOTD:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard motd get
</pre></div>
</div>
<p>To clear the configured MOTD run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard motd clear
</pre></div>
</div>
<p>A MOTD with a <cite>info</cite> or <cite>warning</cite> severity can be closed by the user. The
<cite>info</cite> MOTD is not displayed anymore until the local storage cookies are
cleared or a new MOTD with a different severity is displayed. A MOTD with
a ‘warning’ severity will be displayed again in a new session.</p>
</div>
</div>
<div class="section" id="id25">
<h2>仪表盘排障<a class="headerlink" href="#id25" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id26">
<h3>定位仪表盘<a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h3>
<p>If you are unsure of the location of the Ceph Dashboard, run the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph mgr services | jq .dashboard
&quot;https://host:port&quot;
</pre></div>
</div>
<p>The command returns the URL where the Ceph Dashboard is located: <code class="docutils literal notranslate"><span class="pre">https://&lt;host&gt;:&lt;port&gt;/</span></code></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Ceph 的很多命令行工具都会返回 JSON 格式的结果，你得在操作系统上预先装好 <a class="reference external" href="https://stedolan.github.io/jq">jq</a>
命令行的 JSON 处理工具。</p>
</div>
</div>
<div class="section" id="id27">
<h3>访问仪表盘<a class="headerlink" href="#id27" title="Permalink to this headline">¶</a></h3>
<p>If you are unable to access the Ceph Dashboard, run the following
commands:</p>
<ol class="arabic">
<li><p>Verify the Ceph Dashboard module is enabled:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph mgr module ls | jq .enabled_modules
</pre></div>
</div>
<p>Ensure the Ceph Dashboard module is listed in the return value of the
command. Example snipped output from the command above:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
  <span class="s2">&quot;dashboard&quot;</span><span class="p">,</span>
  <span class="s2">&quot;iostat&quot;</span><span class="p">,</span>
  <span class="s2">&quot;restful&quot;</span>
<span class="p">]</span>
</pre></div>
</div>
</li>
<li><p>If it is not listed, activate the module with the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph mgr module enable dashboard
</pre></div>
</div>
</li>
<li><p>Check the Ceph Dashboard and/or <code class="docutils literal notranslate"><span class="pre">ceph-mgr</span></code> log files for any errors.</p>
<ul>
<li><p>Check if <code class="docutils literal notranslate"><span class="pre">ceph-mgr</span></code> log messages are written to a file by:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config get mgr log_to_file
true
</pre></div>
</div>
</li>
<li><p>Get the location of the log file (it’s <code class="docutils literal notranslate"><span class="pre">/var/log/ceph/&lt;cluster-name&gt;-&lt;daemon-name&gt;.log</span></code>
by default):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config get mgr log_file
/var/log/ceph/$cluster-$name.log
</pre></div>
</div>
</li>
</ul>
</li>
<li><p>Ensure the SSL/TSL support is configured properly:</p>
<ul>
<li><p>Check if the SSL/TSL support is enabled:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config get mgr mgr/dashboard/ssl
</pre></div>
</div>
</li>
<li><p>If the command returns <code class="docutils literal notranslate"><span class="pre">true</span></code>, verify a certificate exists by:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config-key get mgr/dashboard/crt
</pre></div>
</div>
<p>and:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config-key get mgr/dashboard/key
</pre></div>
</div>
</li>
<li><p>If it doesn’t return <code class="docutils literal notranslate"><span class="pre">true</span></code>, run the following command to generate a self-signed
certificate or follow the instructions outlined in
<a class="reference internal" href="#dashboard-ssl-tls-support"><span class="std std-ref">SSL/TLS 支持</span></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard create-self-signed-cert
</pre></div>
</div>
</li>
</ul>
</li>
</ol>
</div>
<div class="section" id="id28">
<h3>从仪表盘看不到日志<a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h3>
<p>If you are unable to log into the Ceph Dashboard and you receive the following
error, run through the procedural checks below:</p>
<img alt="../../_images/invalid-credentials.png" class="align-center" src="../../_images/invalid-credentials.png" />
<ol class="arabic">
<li><p>Check that your user credentials are correct. If you are seeing the
notification message above when trying to log into the Ceph Dashboard, it
is likely you are using the wrong credentials. Double check your username
and password, and ensure the caps lock key is not enabled by accident.</p></li>
<li><p>If your user credentials are correct, but you are experiencing the same
error, check that the user account exists:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-show &lt;username&gt;
</pre></div>
</div>
<p>This command returns your user data. If the user does not exist, it will
print:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ Error ENOENT: User &lt;username&gt; does not exist
</pre></div>
</div>
</li>
<li><p>Check if the user is enabled:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-show &lt;username&gt; | jq .enabled
true
</pre></div>
</div>
<p>Check if <code class="docutils literal notranslate"><span class="pre">enabled</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> for your user. If not the user is
not enabled, run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard ac-user-enable &lt;username&gt;
</pre></div>
</div>
</li>
</ol>
<p>Please see <a class="reference internal" href="#dashboard-user-role-management"><span class="std std-ref">用户和角色管理</span></a> for more information.</p>
</div>
<div class="section" id="id29">
<h3>仪表盘的某个功能失效<a class="headerlink" href="#id29" title="Permalink to this headline">¶</a></h3>
<p>When an error occurs on the backend, you will usually receive an error
notification on the frontend. Run through the following scenarios to debug.</p>
<ol class="arabic simple">
<li><p>Check the Ceph Dashboard/mgr logfile(s) for any errors. These can be
identified by searching for keywords, such as <em>500 Internal Server Error</em>,
followed by <code class="docutils literal notranslate"><span class="pre">traceback</span></code>. The end of a traceback contains more details about
what exact error occurred.</p></li>
<li><p>Check your web browser’s Javascript Console for any errors.</p></li>
</ol>
</div>
<div class="section" id="id30">
<h3>Ceph 仪表盘的日志<a class="headerlink" href="#id30" title="Permalink to this headline">¶</a></h3>
<div class="section" id="id31">
<h4>仪表盘调试标志<a class="headerlink" href="#id31" title="Permalink to this headline">¶</a></h4>
<p>With this flag enabled, traceback of errors are included in backend responses.</p>
<p>To enable this flag via the Ceph Dashboard, navigate from <em>Cluster</em> to <em>Manager
modules</em>. Select <em>Dashboard module</em> and click the edit button. Click the
<em>debug</em> checkbox and update.</p>
<p>To enable it via the CLI, run the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph dashboard debug enable
</pre></div>
</div>
</div>
<div class="section" id="id32">
<h4>配置仪表盘模块的日志级别<a class="headerlink" href="#id32" title="Permalink to this headline">¶</a></h4>
<p>把日志级别设置为 debug 可使日志更详尽，有助于调试。</p>
<ol class="arabic">
<li><p>Increase the logging level of manager daemons:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph tell mgr config set debug_mgr 20
</pre></div>
</div>
</li>
<li><p>通过 Dashboard 或 CLI 调整 Ceph Dashboard 的日志级别：</p>
<ul>
<li><p>Navigate from <em>Cluster</em> to <em>Manager modules</em>. Select <em>Dashboard module</em>
and click the edit button. Modify the <code class="docutils literal notranslate"><span class="pre">log_level</span></code> configuration.</p></li>
<li><p>To adjust it via the CLI, run the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ bin/ceph config set mgr mgr/dashboard/log_level debug
</pre></div>
</div>
</li>
</ul>
</li>
</ol>
<p>#.  High log levels can result in considerable log volume, which can
easily fill up your filesystem. Set a calendar reminder for an hour, a day,
or a week in the future to revert this temporary logging increase.  This looks
something like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ceph config log
...
--- 11 --- 2020-11-07 11:11:11.960659 --- mgr.x/dashboard/log_level = debug ---
...
$ ceph config reset 11
</pre></div>
</div>
</div>
<div class="section" id="reporting-issues-from-dashboard">
<h4>Reporting issues from Dashboard<a class="headerlink" href="#reporting-issues-from-dashboard" title="Permalink to this headline">¶</a></h4>
<p>Ceph-Dashboard provides two ways to create an issue in the Ceph Issue Tracker,
either using the Ceph command line interface or by using the Ceph Dashboard
user interface.</p>
<p>To create an issue in the Ceph Issue Tracker, a user needs to have an account
on the issue tracker. Under the <code class="docutils literal notranslate"><span class="pre">my</span> <span class="pre">account</span></code> tab in the Ceph Issue Tracker,
the user can see their API access key. This key is used for authentication
when creating a new issue. To store the Ceph API access key, in the CLI run:</p>
<p><code class="docutils literal notranslate"><span class="pre">ceph</span> <span class="pre">dashboard</span> <span class="pre">set-issue-tracker-api-key</span> <span class="pre">-i</span> <span class="pre">&lt;file-containing-key&gt;</span></code></p>
<p>Then on successful update, you can create an issue using:</p>
<p><code class="docutils literal notranslate"><span class="pre">ceph</span> <span class="pre">dashboard</span> <span class="pre">create</span> <span class="pre">issue</span> <span class="pre">&lt;project&gt;</span> <span class="pre">&lt;tracker_type&gt;</span> <span class="pre">&lt;subject&gt;</span> <span class="pre">&lt;description&gt;</span></code></p>
<p>The available projects to create an issue on are:
#. dashboard
#. block
#. object
#. file_system
#. ceph_manager
#. orchestrator
#. ceph_volume
#. core_ceph</p>
<p>The available tracker types are:
#. bug
#. feature</p>
<p>The subject and description are then set by the user.</p>
<p>The user can also create an issue using the Dashboard user interface. The settings
icon drop down menu on the top right of the navigation bar has the option to
<code class="docutils literal notranslate"><span class="pre">Raise</span> <span class="pre">an</span> <span class="pre">issue</span></code>. On clicking it, a modal dialog opens that has the option to
select the project and tracker from their respective drop down menus. The subject
and multiline description are added by the user. The user can then submit the issue.</p>
</div>
</div>
</div>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../ceph_api/" class="btn btn-neutral float-right" title="Ceph RESTful API" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../orchestrator_modules/" class="btn btn-neutral float-left" title="ceph-mgr orchestrator 模块" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>